.class Lcom/baidu/sapi2/shell/a$b$a;
.super Lcom/baidu/cloudsdk/common/http/HttpResponseHandler;
.source "SapiAccountRepository.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/baidu/sapi2/shell/a$b;->onSuccess(ILjava/lang/String;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic a:Lcom/baidu/sapi2/shell/a$b;


# direct methods
.method constructor <init>(Lcom/baidu/sapi2/shell/a$b;)V
    .locals 0

    .line 1
    iput-object p1, p0, Lcom/baidu/sapi2/shell/a$b$a;->a:Lcom/baidu/sapi2/shell/a$b;

    invoke-direct {p0}, Lcom/baidu/cloudsdk/common/http/HttpResponseHandler;-><init>()V

    return-void
.end method


# virtual methods
.method protected onFailure(Ljava/lang/Throwable;Ljava/lang/String;)V
    .locals 0

    .line 1
    iget-object p1, p0, Lcom/baidu/sapi2/shell/a$b$a;->a:Lcom/baidu/sapi2/shell/a$b;

    iget-object p1, p1, Lcom/baidu/sapi2/shell/a$b;->a:Lcom/baidu/sapi2/shell/callback/FillUserProfileCallBack;

    invoke-virtual {p1}, Lcom/baidu/sapi2/shell/callback/FillUserProfileCallBack;->onFinish()V

    .line 2
    iget-object p1, p0, Lcom/baidu/sapi2/shell/a$b$a;->a:Lcom/baidu/sapi2/shell/a$b;

    iget-object p1, p1, Lcom/baidu/sapi2/shell/a$b;->a:Lcom/baidu/sapi2/shell/callback/FillUserProfileCallBack;

    const/16 p2, -0x64

    invoke-interface {p1, p2}, Lcom/baidu/sapi2/shell/callback/SapiCallBack;->onSystemError(I)V

    return-void
.end method

.method protected onSuccess(ILjava/lang/String;)V
    .locals 1

    .line 1
    :try_start_0
    iget-object p1, p0, Lcom/baidu/sapi2/shell/a$b$a;->a:Lcom/baidu/sapi2/shell/a$b;

    iget-object p1, p1, Lcom/baidu/sapi2/shell/a$b;->e:Lcom/baidu/sapi2/shell/a;

    invoke-virtual {p1, p2}, Lcom/baidu/sapi2/shell/a;->a(Ljava/lang/String;)I

    move-result p1

    if-eqz p1, :cond_1

    const/16 p2, 0x8

    if-eq p1, p2, :cond_0

    .line 2
    iget-object p2, p0, Lcom/baidu/sapi2/shell/a$b$a;->a:Lcom/baidu/sapi2/shell/a$b;

    iget-object p2, p2, Lcom/baidu/sapi2/shell/a$b;->a:Lcom/baidu/sapi2/shell/callback/FillUserProfileCallBack;

    invoke-virtual {p2}, Lcom/baidu/sapi2/shell/callback/FillUserProfileCallBack;->onFinish()V

    .line 3
    iget-object p2, p0, Lcom/baidu/sapi2/shell/a$b$a;->a:Lcom/baidu/sapi2/shell/a$b;

    iget-object p2, p2, Lcom/baidu/sapi2/shell/a$b;->a:Lcom/baidu/sapi2/shell/callback/FillUserProfileCallBack;

    invoke-interface {p2, p1}, Lcom/baidu/sapi2/shell/callback/SapiCallBack;->onSystemError(I)V

    goto :goto_0

    .line 4
    :cond_0
    iget-object p1, p0, Lcom/baidu/sapi2/shell/a$b$a;->a:Lcom/baidu/sapi2/shell/a$b;

    iget-object p1, p1, Lcom/baidu/sapi2/shell/a$b;->a:Lcom/baidu/sapi2/shell/callback/FillUserProfileCallBack;

    invoke-virtual {p1}, Lcom/baidu/sapi2/shell/callback/FillUserProfileCallBack;->onFinish()V

    .line 5
    iget-object p1, p0, Lcom/baidu/sapi2/shell/a$b$a;->a:Lcom/baidu/sapi2/shell/a$b;

    iget-object p1, p1, Lcom/baidu/sapi2/shell/a$b;->a:Lcom/baidu/sapi2/shell/callback/FillUserProfileCallBack;

    invoke-virtual {p1}, Lcom/baidu/sapi2/shell/callback/FillUserProfileCallBack;->onPhoneUnavailable()V

    goto :goto_0

    .line 6
    :cond_1
    new-instance v0, Lcom/baidu/sapi2/shell/response/SapiAccountResponse;

    invoke-direct {v0}, Lcom/baidu/sapi2/shell/response/SapiAccountResponse;-><init>()V

    .line 7
    iput p1, v0, Lcom/baidu/sapi2/shell/response/SapiResponse;->errorCode:I

    .line 8
    new-instance p1, Lorg/json/JSONObject;

    invoke-direct {p1, p2}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    const-string p2, "displayname"

    .line 9
    invoke-virtual {p1, p2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p2

    iput-object p2, v0, Lcom/baidu/sapi2/shell/response/SapiAccountResponse;->displayname:Ljava/lang/String;

    const-string p2, "bduss"

    .line 10
    invoke-virtual {p1, p2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p2

    iput-object p2, v0, Lcom/baidu/sapi2/shell/response/SapiAccountResponse;->bduss:Ljava/lang/String;

    const-string p2, "uid"

    .line 11
    invoke-virtual {p1, p2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p2

    iput-object p2, v0, Lcom/baidu/sapi2/shell/response/SapiAccountResponse;->uid:Ljava/lang/String;

    const-string p2, "ptoken"

    .line 12
    invoke-virtual {p1, p2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p2

    iput-object p2, v0, Lcom/baidu/sapi2/shell/response/SapiAccountResponse;->ptoken:Ljava/lang/String;

    const-string p2, "stoken"

    .line 13
    invoke-virtual {p1, p2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    iput-object p1, v0, Lcom/baidu/sapi2/shell/response/SapiAccountResponse;->stoken:Ljava/lang/String;

    .line 14
    iget-object p1, p0, Lcom/baidu/sapi2/shell/a$b$a;->a:Lcom/baidu/sapi2/shell/a$b;

    iget-object p1, p1, Lcom/baidu/sapi2/shell/a$b;->a:Lcom/baidu/sapi2/shell/callback/FillUserProfileCallBack;

    invoke-virtual {p1}, Lcom/baidu/sapi2/shell/callback/FillUserProfileCallBack;->onFinish()V

    .line 15
    iget-object p1, p0, Lcom/baidu/sapi2/shell/a$b$a;->a:Lcom/baidu/sapi2/shell/a$b;

    iget-object p1, p1, Lcom/baidu/sapi2/shell/a$b;->a:Lcom/baidu/sapi2/shell/callback/FillUserProfileCallBack;

    invoke-interface {p1, v0}, Lcom/baidu/sapi2/shell/callback/SapiCallBack;->onSuccess(Lcom/baidu/sapi2/shell/response/SapiResponse;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    goto :goto_0

    .line 16
    :catchall_0
    iget-object p1, p0, Lcom/baidu/sapi2/shell/a$b$a;->a:Lcom/baidu/sapi2/shell/a$b;

    iget-object p1, p1, Lcom/baidu/sapi2/shell/a$b;->a:Lcom/baidu/sapi2/shell/callback/FillUserProfileCallBack;

    invoke-virtual {p1}, Lcom/baidu/sapi2/shell/callback/FillUserProfileCallBack;->onFinish()V

    .line 17
    iget-object p1, p0, Lcom/baidu/sapi2/shell/a$b$a;->a:Lcom/baidu/sapi2/shell/a$b;

    iget-object p1, p1, Lcom/baidu/sapi2/shell/a$b;->a:Lcom/baidu/sapi2/shell/callback/FillUserProfileCallBack;

    const/16 p2, -0x64

    invoke-interface {p1, p2}, Lcom/baidu/sapi2/shell/callback/SapiCallBack;->onSystemError(I)V

    :goto_0
    return-void
.end method
